<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Categorys extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('categorys',function(Blueprint $tables)
        {
            $tables->increments('id');
            $tables->char('pid',4)->comment('上级id');
            $tables->char('name',30)->comment('栏目名称');
            $tables->char('private',1)->comment('是否私有');
            $tables->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('categorys');
    }
}
